Conversation
archmoj
reviewed
Apr 23, 2020
archmoj
reviewed
Apr 29, 2020
doc/python/images.md
Outdated
|
|
||
| In order to enable shape drawing, you need to | ||
| - define a dragmode corresponding to a drawing tool (`'drawline'`,`'drawopenpath'`, `'drawclosedpath'`, `'drawcircle'`, or `'drawrect'`) | ||
| - add modebar buttons corresponding to the drawing tools you wish to use. |
Contributor
There was a problem hiding this comment.
link to the config doc here?
doc/python/images.md
Outdated
| img_height = 900 | ||
| scale_factor = 0.5 | ||
| fig.add_layout_image( | ||
| dict( |
Contributor
There was a problem hiding this comment.
the dict here is redundant I'm pretty sure, as add_layout_image accepts these values as kwargs
doc/python/shapes.md
Outdated
|
|
||
| _introduced in plotly 4.7_ | ||
|
|
||
| You can create layout shapes programatically, but you can also draw shapes manually by setting the `dragmode` to one of the shape-drawing modes: `'drawline'`,`'drawopenpath'`, `'drawclosedpath'`, `'drawcircle'`, or `'drawrect'`. If you need to switch between different shape-drawing or other dragmodes (panning, selecting, etc.), modebar buttons can be added in the `config` to select the dragmode. If you switch to a different dragmode such as pan or zoom, you will need to select the drawing tool in the modebar to go back to shape drawing. |
Contributor
There was a problem hiding this comment.
add link to config doc?
Contributor
Author
|
The CI is now green! |
Contributor
|
💃 ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I've prepared the tutorials for shape drawing in preparation JS 1.54 / py 4.7. The CI will obviously fail until we upgrade the code to 1.54.
If you wish to test these tutorials locally, you should fetch this branch and run
to get the right plotly.js branch